import { $axios } from '@/utils/http';

// 获取购物车列表userid
export async function getAllCar(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/shop-car/getAllCar',
    method: 'GET',
    params,
  });
}

//删除购物车某一行
export async function removeWillBuy(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/shop-car/removeWillBuy',
    method: 'POST',
    params,
  });
}

//修改购买数量
export async function updQty(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/shop-car/updQty',
    method: 'POST',
    params,
  });
}

//加入购物车
export async function addShopCar(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/shop-car/addShopCar',
    method: 'POST',
    params,
  });
}
